#ifndef _CSF_PIC_H
#define _CSF_PIC_H

#include "queue.h"

/* writev() limited */
#define MAX_BLOCK_NUMBER	100
#define BUFFER_BLOCK_SIZE	262144

/* Data buffer node structure, to save the picture data */
typedef struct data_node {
	TAILQ_ENTRY(data_node)	data_buffer_entries;    /* Data buffer queue field */
	int	data_len;      /* The data length in the node */
	char	*data;         /* data */
} DATA_BUFFER_NODE;

TAILQ_HEAD(data_buffer_head, data_node);
typedef struct pic_data {
	char pic_url[512];
	char pic_path[512];
	struct data_buffer_head data_buffer_head;
	int block_num;
	int data_len;
	int is_default;
	int is_deleted;
	int ok;
}PIC_DATA;

#endif

